package com.glqiang.service;

import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;

/**
 * @author glq1218
 */
public interface CustomUserDetailsService extends UserDetailsService {
    /**
     * 通过邮箱获取用户
     * @param phone 邮箱
     * @return 用户信息
     * @throws UsernameNotFoundException 用户没有找到的异常
     */
    UserDetails loadUserByPhone(String phone);
}
